"use strict";
Component({
    properties: {
        mes: Object
    },
    data: {
        checked: false,
        title: '现货发顺丰 6期免息',
        name: 'vivo x60 5G 新品拍照',
        num: 1,
        id: '',
        price: 158.00,
        purview: '七天无理由退款'
    },
    methods: {
        handlerName: function (e) {
            var checked = this.data.checked;
            this.setData({
                "checked": !checked
            });
            var index = e.currentTarget.id;
            this.triggerEvent('myevent', { params: { id: index, checked: !checked } }, {});
        }
    },
    observers: {
        "mes": function (e) {
            this.setData({
                checked: e.checked
            });
        }
    },
    attached: function () {
        var mes = this.data.mes;
        this.setData({
            title: mes.title,
            num: mes.num,
            price: mes.price,
            name: mes.name,
            checked: mes.checked,
            id: mes.id
        });
    }
});
